
<!DOCTYPE HTML >
<html>
 <head>
  <title> 登录 </title>
  <meta charset="utf-8">
  <style>
	*{margin:0px;padding:0px}
	.big{width:400px;border:0px solid red;margin:30px auto}
	.big div{height:50px;line-height:50px}
	.big div span{display:inline-block;width:80px}
	input[name=user],input[name=pwd]{width:250px;height:30px}
	select[name=remb]{width:100px;height:25px}
	input[name=sub]{width:105px;height:30px}
  </style>
 </head>

 <body>
	<div class="big">
		<form action="do_login.php" method="post">
			<div>
				<span>用户名</span>
		<input type="text" name="user" value="<?= isset($_COOKIE['user'])?$_COOKIE['user']:""?>">
			</div>
			<div>
				<span>密码</span>
		<input type="password" name="pwd" value="<?= isset($_COOKIE['pwd'])?$_COOKIE['pwd']:""?>">
			</div>
			<div>
				<span>记住时间</span>
				<select name="remb">
					<option value="no"
					<?php
					if(!isset($_COOKIE['remb'])){
						echo "selected";
					}
					?>
					>不记住</option>
					<option value="day"
					<?php 
					if(!isset($_COOKIE['remb'])&&$_COOKIE['remb']=="day"){
						echo "selected";
					}
					?>
					>一天</option>
					<option value="week"
					<?php 
					if(!isset($_COOKIE['remb'])&&$_COOKIE['remb']=="week"){
						echo "selected";
					}
					?>
					>一周</option>
					<option value="month"
					<?php 
					if(!isset($_COOKIE['remb'])&&$_COOKIE['remb']=="month"){
						echo "selected";
					}
					?>
					>一月</option>
				</select>
			</div>
			<div style="text-align:center">
				
				<input type="submit" name="sub" value="登录">
			</div>
		</form>
	</div>
 </body>
</html>
